home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Utilities Experience
/
The Utilities Experience - Volume 1.iso
/
software
/
icons+tools
/
icontools-2.01
/
memfn.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-12-22
|
865b
|
33 lines
/* $Id: memfn.c,v 1.1 1994/02/03 04:10:27 tf Exp $ */
#ifndef lint
static char vcid[]= "$Id: memfn.c,v 1.1 1994/02/03 04:10:27 tf Exp $";
#endif /* lint */
#define DEF_BITWISE_MEM_FUNCTION( NAME, FUNC ) \
char * \
NAME(to,from,n) \
char *to, *from; \
unsigned n; \
{ \
for(;n;n--) \
*to++ FUNC *from++; \
\
return to; \
}
DEF_BITWISE_MEM_FUNCTION(memand,&=)
DEF_BITWISE_MEM_FUNCTION(memor,|=)
DEF_BITWISE_MEM_FUNCTION(memandnot,&=~)
char *
memnot(to,n)
char *to;
unsigned n;
{
for(;n;n--)
*to++ ^= ~0L;
return to;
}